import request from '@/utils/request'
export const getArticleList = ({ current, pageSize }) => {
  return request.get('/admin/interview/query', {
    params: {
      current,
      pageSize
    }
  })
}
export const creatArticle = (obj) => {
  return request.post('/admin/interview/create', obj)
}

// 删除面经
export const removeArticle = (id) => {
  return request.delete('/admin/interview/remove', {
    data: {
      id
    }
  })
}
// 添加面经
export const addArticle = (data) => {
  return request({
    method: 'post',
    url: '/admin/interview/create',
    data
  })
}

// 获取单个面经
export const getArticleDetail = (id) => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}

// 保存编辑后的数据
export const updateArticle = (data) => {
  return request.put('/admin/interview/update', data)
}
